import dayjs from 'dayjs';
import { computed } from 'vue';

export function useDateFomatter() {

    const formattedDateTime = computed(() => {
        return (date) => {
            if (!date) return '';
            return dayjs(date).format('YYYY-MM-DD HH:mm:ss');
        }
    });
    return {
        formattedDateTime
    };
}